% dotsey_dist_plot.m 
%
% CDF and PDF of Dotsey distribution
%


% parameters
% for fixed cost distribution (Dotsey)
alphbar = 0;

acost = -(0)*(pi/2);
bcost = (3/4)*(pi/2);

% acost = (44/50)*(pi/2);
% bcost = (49/50)*(pi/2);

% acost = (0)*(pi/2);
% bcost = (95/100)*(pi/2);

scriptB = 7.81351743774676e-007;

xistar=0:0.000000001:scriptB;
cdftest = xicdfnew(xistar,alphbar,acost,bcost,scriptB);
lxistar=log(xistar);
lcdf = log(cdftest);
pdftest = xidfnew(xistar,alphbar,acost,bcost,scriptB);

% log(xistar) and log(cdf)
xbar = 6.84675281109604e-007;
cdfbar = xicdfnew(xbar,alphbar,acost,bcost,scriptB);

lxbar = log(xbar);
lcdfbar = log(cdfbar);

figure (1)


subplot(2,1,1)
plot(lxistar,lcdf,lxbar,lcdfbar,'o')
xlabel('log(\xi)')
ylabel('log(cdf)')

subplot(2,1,2)
plot(xistar,cdftest,xbar,cdfbar,'o')
xlabel('\xi')
ylabel('cdf')



% subplot(1,2,2)
% plot(xistar,pdftest)
% title('PDF (Dotsey)')